<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        .text span{
            color:red;
        }
        span{
            color:blue;
        }
        h1 span{
            color:black;
        }
        p span{
           color:yellow;
        }
    </style>
</head>
<body>
    <h1>
        <p>
            <span class="text"><span>text</span></span>
        </p>
    </h1>
</body>
</html>